<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of class
 *
 * @author ������
 */
class MessagesObserver implements IObserver{
     

    private $registry;
    
    public function __construct() {
        $this->registry = Registry::getInstance();
    }

    public function notify($eventType, $data) {
        switch ($eventType) {
            case 'message':
                $this->registry->get('pageunit')->addMessages($data['message']);
                break;

            default:
                break;
        }
    }
}
?>
